-
Notifications
You must be signed in to change notification settings - Fork 27
Feature/ticketless client tags in query editor #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature/ticketless client tags in query editor #317
Conversation
|
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
|
Cla was accepted waiting for #309 before i can publish this @laserninja @RoeyoOgen |
| return ds.SQLDatasource.QueryData(ctx, req) | ||
| } | ||
|
|
||
| func (ds *SQLDatasourceWithTrinoUserContext) injectClientTags(contextWithTags context.Context, req *backend.QueryDataRequest, settings models.TrinoDatasourceSettings) context.Context { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not referencing ds anywhere, so this method doesn't need to be bound to it. Remove (ds *SQLDatasourceWithTrinoUserContext), and place it after injectAccessToken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look done, have you not pushed some changes?
|
Please squash all commits |
|
@laserninja sadly my code based on your changes, i will pull your changes after you finish the cr process |
904a534 to
c699b9e
Compare
|
@nineinchnick done replying and fixing, thanks for the cr. |
8bb3509 to
61c6a88
Compare
|
Hi @nineinchnick stil needs second cr 🙏🏻 |
|
@nineinchnick still waits for cr |
nineinchnick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the PR description with some examples of when this is useful? I'm not sure why this is needed over creating multiple data sources with different client tags configured.
| await expect(page.getByTestId('data-testid table body')).toContainText(/.*1995-01-19 0.:00:005703857F.*/); | ||
| } | ||
|
|
||
| async function runQueryAndRetrunRequset( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the typos
| import { DataSource } from './datasource'; | ||
| import { TrinoDataSourceOptions, TrinoQuery, defaultQuery, SelectableFormatOptions } from './types'; | ||
| import { FormatSelect, QueryCodeEditor } from '@grafana/aws-sdk'; | ||
| import { Input } from '@grafana/ui'; // <-- ADD THIS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the comment for?
|
I need it in order to give my “clients” the ability to choose in which cluster there query should be running, i give them only the gateway link and they decide by client tag where will it run. @nineinchnick |
Allows to override the client tags that were set in the data source addition , via the the query editor.
Based on pr #309 by @laserninja that allows setting the client tags in the data source addition .